package com.sam.scanner.activity;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.sam.scanner.R;
import com.sam.scanner.adapter.InPackageRecordAdapter;

import java.util.ArrayList;

public class InPackageRecordActivity extends AppCompatActivity {

    RelativeLayout view_top_bar;
    RecyclerView   mInPackageRecordList;
    InPackageRecordAdapter adapter;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_in_package_record);
        initView();
    }

    private void initView(){
        view_top_bar = findViewById(R.id.view_top_bar);
        view_top_bar.findViewById(R.id.tv_back).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });
        ((TextView)view_top_bar.findViewById(R.id.tv_toobar_title)).setText("入库快件记录");
        mInPackageRecordList = findViewById(R.id.recycler_list);
        mInPackageRecordList.setLayoutManager(new LinearLayoutManager(this));
        adapter = new InPackageRecordAdapter(getApplicationContext(),new ArrayList<String>(){{
            add("");
            add("");
            add("");
            add("");
            add("");
            add("");
        }});

        mInPackageRecordList.setAdapter(adapter);


    }
}
